package top.szhome.framework.starter.jwt.configuration;

import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import top.szhome.framework.starter.jwt.JwtUtil;
import top.szhome.framework.starter.jwt.property.JwtProperties;

/**
 * JWT配置
 *
 * @author 唐加利
 * @date 2023/7/24
 **/
@AutoConfiguration
@EnableConfigurationProperties(JwtProperties.class)
public class JwtAutoConfiguration {

    /**
     * 为JWT工具类设置配置信息
     * @param jwtProperties
     * @return
     */
    @Bean
    public JwtUtil jwtUtil(JwtProperties jwtProperties){
        return new JwtUtil(jwtProperties);
    }

}
